import Vue from 'vue'
import Router from 'vue-router'
import CampusBinhai from '@/components/CampusBinhai'
import CampusChashan from '@/components/CampusChashan'
import CampusYueqing from '@/components/CampusYueqing'
import StudentSystem from '@/components/StudentSystem'

// 茶山校区的子路由组件
const Building5 = { template: '<div>五号楼信息</div>' }
const Building6 = { template: '<div>六号楼信息</div>' }
const Building7 = { template: '<div>七号楼信息</div>' }

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'CampusBinhai',
      component: CampusBinhai
    },
    {
      path: '/chashan',
      component: CampusChashan,
      children: [
        {
          path: 'building5',
          component: Building5
        },
        {
          path: 'building6',
          component: Building6
        },
        {
          path: 'building7',
          component: Building7
        }
      ]
    },
    {
      path: '/yueqing',
      name: 'CampusYueqing',
      component: CampusYueqing
    },
    {
      path: '/student',
      name: 'StudentSystem',
      component: StudentSystem
    }
  ]
}
)